﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using WebTV_Kickstarter;

namespace Kickstarter.Models
{
    public class Gebruiker_Validator
    {
        [Required(ErrorMessage="Email is verplicht")]
        [DataType(DataType.EmailAddress, ErrorMessage = "Ongeldig Email-Adres")]
        [RegularExpression(@"[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}", ErrorMessage = "Ongeldig Email-Adres")]
        public string Email { get; set; }

        [Required(ErrorMessage = "Naam is verplicht")]
        [RegularExpression(@"^([A-z\'\.-]*(\s))+[A-z\'\.-]*$", ErrorMessage = "Geen geldige naam (Voor- en achternaam)")]
        public string Name { get; set; }

        [Required(ErrorMessage = "Plaats is verplicht")]
        [RegularExpression(@"^([A-z\'\.-]*(\s)?)+[A-z\'\.-]*$", ErrorMessage = "Geen geldige plaats")]
        public string Place { get; set; }

        [Required(ErrorMessage = "Adres is verplicht")]
        [RegularExpression(@"^[a-zA-Z\s?]+\s[1-9]{1}[0-9]{0,3}?[a-zA-Z]?$", ErrorMessage = "Geen geldig adres")]
        public string Adress { get; set; }

        [Required(ErrorMessage = "Wachtwoord is verplicht")]
        public string Wachtwoord { get; set; }
    }

  
}